<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
      <!-- slides -->
      <swiper-slide v-for="(item,index) of swiperList" :key="item.id">
        <img class="swiper-img" :src="item.imgUrl" alt="">
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>
<script>
  export default{
      name:'HomeSwiper',
      data(){
            return{
                swiperOption:{
                  pagination:'.swiper-pagination',
                  loop:true
                },
                swiperList:[
                  {
                      id:'0001',
                      imgUrl:'http://img1.qunarzz.com/piao/fusion/1806/52/2d3e1eb7a98eb702.jpg_890x330_dc82a85d.jpg'
                  },
                  {
                    id:'0002',
                    imgUrl:'http://img1.qunarzz.com/piao/fusion/1806/be/6a63ae14768f0702.jpg_890x330_72fa03c3.jpg'
                  }
                ]
            }
      }
  }
</script>
<style scoped  lang="scss">
  .wrapper >>> .swiper-pagination-bullet-active{
    background: #fff !important;
  }
  .wrapper{
    overflow:hidden;
    width:100%;
    height:0;
    padding-bottom:37.07%;
    background:#ccc;
    .swiper-img{
      width:100%;
    }
  }

</style>
